<template>
  <div>
    <el-container>
      <el-header>
        <el-avatar
          :size="50"
          src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
          @click="querry"
        />{{ admEmployee }}</el-header
      >
      <el-container>
        <!-- style="background-color: rgb(238, 241, 246)" -->
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
          <el-row class="tac">
            <!-- :span="12" -->
            <el-col>
              <!-- <h5 class="mb-2">Default colors</h5> -->
              <el-menu
                :default-openeds="[]"
                class="el-menu-vertical-demo"
                :router="true"
              >
                <el-sub-menu index="2">
                  <template #title>
                    <el-icon><location /></el-icon>
                    <span>服务管理</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/servePersonList"
                      >服务人员查询</el-menu-item
                    >
                    <el-menu-item index="/main">2-2</el-menu-item>
                  </el-menu-item-group>
                </el-sub-menu>
                <!--      商品模块          -->
                <el-sub-menu index="1">
                  <template #title>
                    <el-icon><Shop /></el-icon>
                    <span>商品</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/wares">我的界面</el-menu-item>
                    <el-menu-item index="/main">1-2</el-menu-item>
                  </el-menu-item-group>
                </el-sub-menu>
                <!-- 用户模块 -->
                <el-sub-menu index="3">
                  <template #title>
                    <el-icon><Shop /></el-icon>
                    <span>客户</span>
                  </template>
                  <el-menu-item-group>
                    <el-menu-item index="/account">账号管理中心</el-menu-item>
                    <el-menu-item index="/user">客户中心</el-menu-item>
                  </el-menu-item-group>
                </el-sub-menu>
              </el-menu>
            </el-col>
          </el-row>
        </el-aside>
        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import axios from "axios";
import { onMounted } from "vue";
import { ElMessage } from "element-plus";
import { UserFilled } from "@element-plus/icons-vue";

onMounted(() => {
  axios.get("/cus/main").then((resp) => {
    console.log(resp)
    if (resp.data.code == 401) {
      ElMessage.error(response.data.msg);
    }
  });
});
</script>

<style>
</style>